<!DOCTYPE html>
<?php if (!is_fang90_server_name()) : ?>
<!-- 
┏┓╋┏┓╋┏┓╋╋╋╋╋╋┏━┓
┃┃╋┃┃╋┃┃╋╋╋╋╋╋┃┏┛
┃┃╋┃┣━┛┣┳━━┳━┳┛┗┳━━┳━┓┏━━┓
┃┃╋┃┃┏┓┣┫┏┓┃┏╋┓┏┫┏┓┃┏┓┫┏┓┃
┃┗━┛┃┗┛┃┃┏┓┃┃┃┃┃┃┏┓┃┃┃┃┗┛┃
┗━━━┻━━┻┻┛┗┻┛┗┻┛┗┛┗┻┛┗┻━┓┃
╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋┏━┛┃
╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋┗━━┛

http://udfang.com
Work with us? We're a fun bunch!  http://udfang.com/about
-->
<?php endif; ?>
<html lang="zh-CN">
<head>
    <?php $siteTitle = is_fang90_server_name() ? "房90" : "U点房";?>
    <title><?php if (is_fang90_server_name()) : ?>房90<?php else: ?>精选楼盘推荐 / U点房<?php endif; ?></title>
    <meta content='IE=Edge' http-equiv='X-UA-Compatible'>
    <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
    <link rel="shortcut icon" type="image/x-icon" href="/<?php if(is_fang90_server_name()) : ?>f90.ico<?php else : ?>favicon.ico<?php endif; ?>" />
    <meta name="viewport" content="width=device-width, initial-scale=1,  minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <meta content='上海楼盘,上海新开楼盘,上海房价走势,上海新楼盘精选' name='keywords'>
    <meta content='<?php e($siteTitle); ?>为您精选推荐最新楼盘信息，精选开盘楼盘信息，精选在售楼盘信息，了解和关注更多精选新楼盘信息，就上<?php e($siteTitle); ?>。' name='description'>
    <link rel="stylesheet" href="/assets/css/building/reset.css" />
    <?php if (is_fang90_server_name()) : ?>
    <link rel="stylesheet" href="/assets/css/building/index-fang90.css?v=0725" />
    <?php else: ?>
    <link rel="stylesheet" href="/assets/css/building/index.css?v=0711" />
    <?php endif; ?>
    <link rel="stylesheet" href="/assets/css/building/jquery.bxslider.css">
    <style>
        .hero .bxslider .bx a{background-image: url(../../images/building/1.png);}
        .building-grid-block p.number{margin-top: 3px;}
        .building-grid-block p.number span{font-size:12px;color: #999999;padding-bottom:15px;line-height: 20px;border:1px solid #ccc;padding:3px;border-radius: 3px;margin:5px;
        }
        @media screen and (min-width: 640px) {
            .hero .bxslider .bx a{background-image: url(../../images/building/01.png);}
        }
    </style>
</head>
<body>
<?php if (!is_fang90_server_name()) : ?>
    <nav class='header'>
        <div class='wrapper'>
            <div class='inner'>
                <a class='logo' href='/'><span class="icon-udf"></span></a>
                <div class='right'><a class='share' href='#'> 分享 </a> 
                    <div class="share-list">
                        <a href="javascript:void(0)" class="weixin">微信</a>
                        <a href="javascript:void(0)" class="qq">QQ空间</a>
                        <a href="javascript:void(0)" class="sina">新浪微博</a>
                    </div>
                </div>
            </div>
        </div>
    </nav>
    <section class="hero">
        <ul class="bxslider">
            <?php
                if($homotop):
                if($is_mobile):  
                $iii = 0;
                foreach ($homotop['mobile'] as $key=>$value) :
                $iii++;
            ?>
            <li class="bx">
                <?php if ($iii < 2): ?>
                    <div class="overlay"></div>
                    <div class="text-wrap">
                        <h1>发现新鲜楼盘</h1>
                        <p>已向全国 17 个城市中热爱生活的人们第一时间推荐了 300+ 的新鲜楼盘。</p>
                        <input type="button" class="overlay-button" value="浏览楼盘" />
                    </div>
                <?php endif ?>
                <a target="_blank" style="background-image:url(<?php echo $value->absolute_url; ?>)" href="<?php echo $value->url; ?>"></a>
            </li>
            <?php 
                endforeach;
                else:
                $ii = 0;
                foreach ($homotop['pc'] as $key=>$value) :
                $ii++;
            ?>
            <li class="bx">
                <?php if ($ii < 2): ?>
                    <div class="overlay"></div>
                    <div class="text-wrap">
                        <h1>发现新鲜楼盘</h1>
                        <p>已向全国 17 个城市中热爱生活的人们第一时间推荐了 300+ 的新鲜楼盘。</p>
                        <input type="button" class="overlay-button" value="浏览楼盘" />
                    </div>
                <?php endif ?>
                <a target="_blank" style="background-image:url(<?php echo $value->absolute_url; ?>)" href="<?php echo $value->url; ?>"></a>
            </li>
            <?php
                endforeach;
                endif;
                endif;
            ?>
        </ul>
    </section>
<?php endif; ?>
    <section class='buildings'>
        <div class='tab-wrapper<?php if (is_fang90_server_name()) : ?> fang90_color<?php endif; ?>'>
            <ul class='tabs building-tabs<?php if (is_fang90_server_name()) : ?> fang90_color<?php endif; ?>'>
            	<?php if (is_fang90_server_name()) : ?><li><a class='logo' href='/'><span class="icon-fang90-logo"></span></a></li><?php endif; ?>
                <?php
                    if ($tags && !is_fang90_server_name()) :
                    $i = 0;
                    foreach ($tags as $key=>$value) :
                    $i++;   
                ?>
                <li class="<?php echo $value->url_str; ?>  <?php if($i > 2){echo 'hide-on-mobile';} ?>  <?php if($value->url_str=='jxlp'){echo 'active';} ?>">
                    <a href='javascript:void(0)'><?php echo $value->tag_name; ?></a>
                </li>
                <?php
                    endforeach;
                    endif; 
                ?>
<!--                 <li class='building-news'>
                    <a href='javascript:void(0)'>楼盘动态</a>
                </li> -->
                <li class='place'>
                    <?php if(isset($city) && $tmp_a==1):?>
                        <a href='javascript:void(0)'><?php echo $city->area_name?></a>
                    <?php else:?> 
                        <a href='javascript:void(0)'>所有城市</a>
                    <?php endif;?>                   
                        <div class="city">
                            <img class="arrow" src="/assets/images/building/arrow.png" />
                            <div class='contain'>
                                <ul class='filter'>
                                    <li>全部
                                        <a href='/'>所有城市</a>
                                    </li>
                                    <?php
                                        if ($cities) :
                                        foreach ($cities as $key=>$value) :
                                    ?> 
                                    <li><?php echo $key;?>
                                        <?php  foreach ($value as $k=>$v) :?>
                                            <?php if (is_fang90_server_name()) : ?>
                                                 <a href='/buildings/front/home/index/<?php echo  $v->code;?>'><?php echo  $v->area_name;?></a>
                                            <?php else: ?>
                                                <a href='/building/<?php echo  $v->code;?>'><?php echo  $v->area_name;?></a>
                                            <?php endif; ?>
                                        <?php endforeach;?>
                                    </li>
                                    <?php
                                        endforeach;
                                        endif; 
                                    ?>               
                                </ul>
                            </div>
                        </div>
                </li>
            </ul>
        </div>
        <div class="tab-wrapper-hide"></div>
        <div class="building-container">
            <div class="building-grid">
                <ul class="building-list">
                    <?php
                        // $viewArr = ['1616'=>63199, '1617'=>58212, '1618'=>50917, '1619'=>77810, '1620'=>71043, '1621'=>55023, '1622'=>49032, '1623'=>41675, '1624'=>49130, '1625'=>33892, '1626'=>53891, '1627'=>42750];
                        if ($buildings) :
                        foreach ($buildings as $key=>$value) :
                    ?>
                    <li class="building-grid-block jxlp_p">
                        <a target="_blank" href="/building/<?php echo isset($value->city_code) ? $value->city_code : 'shanghai'; ?>/<?php echo $value->id;?>/campaign">
                            <img data-src="<?php echo $value->photo->absolute_url;?>" class="lazyload">
                            <p class="name"><?php echo $value->name;?></p>
                                <p class="price"><?php if ($value->ave_price != 0) {
                                    echo $value->ave_price.'元/平米'; if($value->id == '1627') e("起"); 
                                } else {
                                    echo '价格待定';
                                }
                                ?></p>
                            <!-- <p class="number"><?php echo $value->brower; ?>次浏览</p> -->
                            <?php if(!is_fang90_server_name()) { ?><p class="number"><?php if ($value->tags): foreach ($value->tags['putong'] as $ptTag) : ?><span><?php e($ptTag->tag_name); ?></span><?php endforeach; endif;?></p><?php } ?>
                        </a>
                    </li>
                    <?php
                        endforeach;
                        endif; 
                    ?>
                    <div class="mainShow clearfix"></div>
                </ul>
            </div>
            <?php if(!is_fang90_server_name()) : ?><a href="javascript:void(0)" class="button large tertiary" id="showAllHouse">查看所有楼盘</a><?php endif; ?>
        	<?php if (is_fang90_server_name()) : ?>
        	<div class="partner">
				<h1>房90的合作伙伴</h1>
				<div class="partner-a">
					<a href="http://www.baidu.com/">百度</a>
					<a href="http://udfang.com/">U点房</a>
					<a href="http://www.sohu.com/">搜狐</a>
					<a href="http://toutiao.com/">今日头条</a>
					<a href="http://fang90.com/">房90</a>
					<a href="http://www.qq.com/">腾讯网</a>
					<a href="http://www.youku.com/">优酷</a>
					<a href="http://www.tudou.com/">土豆</a>
				</div>
			</div>
			<?php endif; ?>
        </div>
	
                <!-- 楼盘动态 -->
<!--         <div class="news-wrapper" style="display: none;">
            <div class="news-inner">
                <?php
                        if ($new_records) :
                        foreach ($new_records as $key=>$value) :
                ?>
                <div class="news-grid">
                    <a href="/news/<?php echo $value->citycode->code;?>/<?php echo $value->id;?>"><h3><?php echo $value->title;?></h3></a>
                    <a href="/news/<?php echo $value->citycode->code;?>/<?php echo $value->id;?>"><img class="news-pic" src="<?php echo $value->absolute_url_news;?>?imageView2/1/w/474/h/305/interlace/1" alt=""></a>
                    <div class="article">
                        <h5><div class="author-wrapper"><img class="author" src="<?php echo $value->absolute_url_author;?>" alt=""></div><?php echo $value->author;?><span><?php echo $value->ptime;?></span></h5>
                        <a href="/news/<?php echo $value->citycode->code;?>/<?php echo $value->id;?>"><p><?php echo $value->zhaiyao;?></p></a>
                    </div>
                    <div class="clearfix"></div>
                </div>
                <?php
                        endforeach;
                        endif; 
                ?> 
            </div>
            <a href="javascript:void(0)" class="button large tertiary" id="showAllNews">更多动态</a>
        </div> -->
    </section>

    <?php $this->load->view('footer') ?>
    <span class="bdsharebuttonbox" style="display: none;">
        <a title="分享到微信" href="#" class="bds_weixin" data-cmd="weixin"></a>
        <a title="分享到新浪微博" href="#" class="bds_tsina" data-cmd="tsina"></a>
        <a title="分享到QQ空间" href="#" class="bds_qzone" data-cmd="qzone"></a>
    </span>
    <input id="buildingsNum" type="hidden" value="<?php echo $buildingsNum;?>">
    <input id="start" type="hidden" value="8">
    <input id="city_code_1" type="hidden" value="<?php if(isset($city) && $tmp_a==1){echo $city->area_id;} ?>">
    <script src="/assets/js/building/jquery-1.11.1.min.js"></script>
    <script src="/assets/js/building/jquery.bxslider.min.js"></script>
    <script src="/assets/js/building/share.js"></script>
    <script src="/assets/js/building/index.js"></script>
    <script src="/assets/js/building/home.js"></script>
    <script src="/assets/js/building/lazysizes.js"></script>
    <script src="/assets/js/building/common.js"></script>

    <script>
    //加载更多
    var build_code = '';
    var offset = '';
    var loadNums="";
    var citycode1 = "";
    $("#showAllHouse").click(function(){
            var obj = $(this);
            loadNums = $("#buildingsNum").val();
            startNum = $("#start").val();
            if($("#city_code_1").val() != '' || undefined){
                citycode1 = $("#city_code_1").val();
            }
            if(loadNums == 8){
                $("ul.building-tabs>li").each(function() {
                    var selectedClass = $(this).attr("class").substr($(this).attr("class").length-6,6);
                    if(selectedClass == 'active'){
                        build_code = $(this).attr("class").substr(0,4);
                    }
                });
                  var ajaxLoadMore="/buildings/front/home/ajaxLoadMore";
                  $.ajax({
                        type: "get",
                        url: ajaxLoadMore,
                        data: {
                            'code':build_code,
                            'startNum':startNum,
                            'lastofset':loadNums,
                            'citycode':citycode1,
                        },
                        dataType:'json',
                        success: function(msg){
                            console.log(msg);
                            if(msg.str){
                                $(msg.str).insertBefore(".mainShow");
                                $("#start").val(msg.startNum);
                                $("#buildingsNum").val(msg.loadNums);
                                // 楼盘图片高度是宽度的72%
                                var bgbWidth = $(".building-grid-block").width();
                                $(".building-grid-block").find("img").css("height", bgbWidth * 0.72);
                            }else{
                                obj.hide();
                            }
                    },
                });
               
            }else{
                obj.hide();
            }
    });
    // 导航切换被选中状态
    $("ul.building-tabs>li").each(function() {
        if ($(this).attr("class") != "place") {
             if ($(this).attr("class") != "building-news"){
                    $(this).click(function() {
                    $(".building-container").show();
                    $(".news-wrapper").hide();
                        $('.status2').toggle();
                        $("ul.building-tabs li").removeClass("active");
                        $(this).addClass("active");

                        var code = $(this).attr("class");
                        var build_code = code.substr(0,4);
                        var ajaxLookBuild="/buildings/front/home/ajaxLookBuild";
                        //alert(build_code);return false;
                        $.ajax({
                            type: "get",
                            url: ajaxLookBuild,
                            data: {
                                'code':build_code
                            },
                            //dataType:'html',
                            success: function(msg){
                                console.log(msg);
                                if(msg){
                                    $(".building-list li.jxlp_p").remove();
                                    $(".building-list").prepend(msg);

                                    
                                    // $(".building-list").html("<div class='mainShow clearfix'></div>");
                                    // //var str = msg."<div class='mainShow clearfix'></div>";
                                    // $(msg).insertBefore(".mainShow");
                                    // $("#showAllHouse").show();
                                }else{
                                    alert('服务器繁忙，请重试！');
                                }
                            },
                        });
                    });
            } else {
                $(this).click(function() {
                    $('.status2').toggle();
                    $("ul.building-tabs li").removeClass("active");
                    $(this).addClass("active");
                    $(".building-container").hide();
                    $(".news-wrapper").show();
                });
            }
        }
    });
    // 楼盘图片高度是宽度的72%
    var bgbWidth = $(".building-grid-block").width();
    $(".building-grid-block").find("img").css("height", bgbWidth * 0.72);
    $(window).resize(function() {
        var bgbWidth = $(".building-grid-block").width();
        $(".building-grid-block").find("img").css("height", bgbWidth * 0.72);
    });
    </script>

</body>
</html>